class Calculator():
    def __init__(self,a,b):
        self.a=int(a)
        self.b=int(b)
        print("我是初始化方法",a+b)

    def add(self):
        return self.a+self.b

    def sub(self):
        return  self.a-self.b

    def mul(self):
        return  self.a*self.b

    def div(self):
        return  self.a/self.b

# if __name__ == '__main__':
#     mmm=Calculator(11,22)
#     print(mmm.add())
#     print(mmm.sub())
#     print(mmm.mul())
#     print(mmm.div())



class dog():
    def __init__(self,name,weight,age):
        self.name=name
        self.weight=int(weight)
        self.age=int(age)

    def food(self):
        print(self.name+'狗吃了食物')
        self.weight+=10

    def roar(self):
        print(self.name+'wow,wow,wow')
        # self.weight=self.weight-5
        self.weight-=5

    def sit(self):
        print(self.name+'我的狗坐下')

if __name__ == '__main__':
    t1=dog('小黄',150,20)
    print(t1.weight)
    t1.food()
    print(t1.weight)
    # t1.roar()
    # print(t1.weight)





